package operations;

import bookList.BookList;

/**
 * The type Display operation.
 *
 * @author CY
 * @date 2022 /08/09 23:45
 */
public class DisplayOperation implements Operations {

    @Override
    public void work(BookList bookList) {
        System.out.println("展示书籍！");
        for (int i = 0; i < bookList.getUsedSize(); i++) {
            System.out.println("------------------------------------------------------------------------------------");
            System.out.println(bookList.getBooks()[i]);
            if (i == bookList.getUsedSize() - 1) {
                System.out.println("------------------------------------------------------------------------------------");
            }
        }
        System.out.println();

    }
}
